{{ $file := .Get "file" }}
<div class="asciicast-wrapper">
    {{- $cast := resources.Get (print "recordings/" $file ".cast") -}}
    <asciinema-player id="asciinema-player" src="{{ $cast.RelPermalink }}" font-size="12px" poster="npt:{{ .Get "poster" }}" preload></asciinema-player>
    {{- if .Get "instructions" -}}
        {{- $instructions_file := print "recordings/" $file "_instructions.json" -}}
        {{ $data := resources.Get $instructions_file | transform.Unmarshal }}
        <article class="panel">
            <p class="panel-heading">
                Video Content
            </p>
            {{- range $instr := $data -}}
                <a href="#" class="panel-block" data-from="{{ $instr.time_from }}" data-to="{{ $instr.time_to }}">
                    <span class="instruction-text">{{ $instr.instruction | markdownify }}</span>
                    <span class="tag is-light">{{ int $instr.time_from | dateFormat "04:05" }}</span>
                </a>
            {{- end -}}
        </article>
    {{- end -}}
</div>
